NYC Rent Explorer is a shiny application that utilizes New York City renting data in order to analyze rent pricing trends. It examines how the cost of different apartment types and areas of NYC have changed over time.

This is a multi-purpose app which can provide useful market information to renters, landlords, economists and researchers.

The github repository can be found here

Map and Time Series Analysis

The first tab allows the user to select a NYC borough (Manhattan, Brooklyn, Queens, Bronx) and a neighborhood corresponding to the chosen borough.

Once the user has done that, the map will automatically update, showing the physical location of the neighborhood in NYC. Below the map, a time series chart displays how the median rent of the selected neighborhood and apartment type (default studio) has changed over time.

The user has the option to view the median price time series for different apartment types by using the “Select an apartment type” drop-down menu.

Compare Neighborhoods

The compare neighborhoods tab allows the user to important pieces of information. First the user selects a neighborhood and/or borough to view a time series of the media rent of all apartment types in the area. This is a great way to see the cost difference of apartments with a certain number of rooms in a specific NYC region.

Toggle which apartment types you want visible on the time series chart by clicking the name of the apartment type on the chart legend (right of screen).



The second graph is an overlaid histogram that allows the user to select two different neighborhoods, boroughs and apartment types, and then compare the median rent distributions of the two.

This is an effective tool allowing the user to see the rent price disparities between neighborhoods, and across different sized apartments.

Time Series Forecast

The time series forecast tab allows user to see time series decomposition of their selection, however, the chosen options must not have any missing values for decomposition plot. If this happens, the user gets a message telling them that they should go with different neighborhoods or apartment types. The decomposition plot provides user with information such as the observed pattern, trend, seasonality, and randomness.

The forecast button enables the user to run a simple time series forecasting on their choices. If the This uses Facebook’s prophet library in the backend and requires 20-30 seconds to run. We also provide the user with a numeric input they can choose for the numbers of years they like to see the prediction. Needless to say, more years will lead to higher uncertainty. If the choices have missing values, this can lead to less accurate results as well.

The resulting plot will show the actual values as black dots, the predicted values as blue line and the confidence interval as the shaded area with light blue.

Data Spreadsheet

The final tab of NYC Rent Explorer is simply master data spreadsheet that is used in order to create the charts and data analysis of the previous sections.

The data will automatically filter and update based on user input. If the user wants to look at the raw data for Woodside, Queens, they simply type in the neighborhood and borough name:

Required Packages

NYC Rent Explorer utilizes various R packages. A short description and link to their respective package websites are referenced below:

  • shiny: Used to create this application
  • rgdal: Provides spatial information for interactive, leaflet map
  • leaflet: Create dynamic map that shows the neighborhood of NYC
  • plotly: Create more powerful, interactive maps
  • dygraphs: Useful library to enhance time series graphics
  • prophet: Library revolving around time series work, used in our time series forcast tab
  • shinythemes: Used to create a sleeker visual design for our shiny application
  • shinycssloaders: Used to add a loading spinner while output is calculating or recalculating
  • tidyverse: Useful collection of libraries; mainly used for data cleaning in EDA in our case

Data Source and Structure

Our data is structured so that each observation (row) stores the neighborhood name, borough name, a date (which is the first day of every month since 2010 till 2021), median rent price for a studio, one bedroom, two bedroom, three bedroom+, and the longitude and latitude coordinates of the neighborhood.

NYC Rent Explorer sources its data from StreetEasy.com, which is an online real estate marketplace that exclusively operations in New York City.

NYC Rent Explorer is in no way related nor sponsored with StreetEasy.com